<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<link rel="stylesheet" href="<%=path%>/css/pintuer.css">
<link rel="stylesheet" href="<%=path%>/css/admin.css">
<link rel="shortcut icon" href="<%=path%>/images/login.jfif">
<script src="<%=path%>/js/jquery.js"></script>
<!-- 引入zTree插件 -->
<link rel="stylesheet" type="text/css"
	href="<%=path%>/third/zTree_v3/css/zTreeStyle/zTreeStyle.css">
<script type="text/javascript"
	src="<%=path%>/third/zTree_v3/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript"
	src="<%=path%>/third/zTree_v3/js/jquery.ztree.core.js"></script>
<script type="text/javascript"
	src="<%=path%>/third/zTree_v3/js/jquery.ztree.excheck.js"></script>
<script type="text/javascript">
</script>

</head>

<body>
  <div class="panel admin-panel">
  <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>增加慢性病报销政策</strong></div>
  <div class="body-content">
    <form id="form-addrole" class="form-x">  
      <input id="fid" name="fid" value="" type="hidden"/>
      <div class="form-group">
        <div class="label">
          <label>年度：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="" name="year"  id="year_input" data-validate=" required:请输入行政区域编号" />
          <span></span>
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label>报销封顶线：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="" name="line" id="line_input"data-validate=" required:请输入行政区域名称" />
          <div class="tips"></div>
        </div>
      </div>
    
      <div class="form-group">
        <div class="label">
          <label>报销比例：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="" name="proportion" id="proportion_input"data-validate=" required:请输入行政区域名称" />
          <div class="tips"></div>
        </div>
      </div>
      
   
      <div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field">
          <button id="add_btn" class="button bg-main icon-check-square-o" type="button"  onclick="addPolicy()"> 提交</button>
        </div>
      </div>
    </form>
  </div>
</div>


<script type="text/javascript">
  function addPolicy(){
   var year = $("#year_input").val();
   var line = $("#line_input").val();
   var proportion = $("#proportion_input").val();
      $.ajax({
               url:"<%=path%>/policy/policy_add_action",
               type:"post",
               data:{year:year,
                         line:line,
                         proportion:proportion},
      
               success:function(res){
                 if(res.code==100){
                     alert("添加成功");
                 }else{
                     alert("添加失败");
                 }
               
               }
       })
   
   
  }
</script>

</body>
</html>
